﻿using System;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace AliFox.BaseService.BaseData;

public class Organization(
    Guid id,
    Guid? tenantId,
    short categoryId,
    Guid? pid,
    string name,
    string fullName,
    int sort,
    bool leaf,
    bool enabled)
    : AuditedAggregateRoot<Guid>(id), ISoftDelete, IMultiTenant
{
    public Guid? TenantId { get; } = tenantId;

    /// <summary>
    /// 机构分类: 1.公司; 2.组织; 3.部门; 4.供应商
    /// </summary>
    public short CategoryId { get; set; } = categoryId;

    public Guid? Pid { get; set; } = pid;

    public string Name { get; set; } = name;

    public string FullName { get; set; } = fullName;

    public int Sort { get; set; } = sort;

    /// <summary>
    /// 是否子集
    /// </summary>
    public bool Leaf { get; set; } = leaf;

    /// <summary>
    /// 级联
    /// </summary>
    public string CascadeId { get; set; }

    public bool Enabled { get; set; } = enabled;

    public bool IsDeleted { get; init; }

}